package com.intelligent.bot.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ad_config
 */
@TableName(value ="ad_config")
@Data
public class AdConfig implements Serializable {
    /**
     * 广告id
     */
    @TableId(type = IdType.AUTO)
    private Integer adId;

    /**
     * 广告标题
     */
    private String adTitle;

    /**
     * 广告内容
     */
    private String adMsg;

    /**
     * 广告图片url
     */
    private String adImg;

    /**
     * 广告跳转链接
     */
    private String adUrl;
    /**
     * 广告状态
     */
    private String adStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AdConfig other = (AdConfig) that;
        return (this.getAdId() == null ? other.getAdId() == null : this.getAdId().equals(other.getAdId()))
            && (this.getAdTitle() == null ? other.getAdTitle() == null : this.getAdTitle().equals(other.getAdTitle()))
            && (this.getAdMsg() == null ? other.getAdMsg() == null : this.getAdMsg().equals(other.getAdMsg()))
            && (this.getAdImg() == null ? other.getAdImg() == null : this.getAdImg().equals(other.getAdImg()))
            && (this.getAdUrl() == null ? other.getAdUrl() == null : this.getAdUrl().equals(other.getAdUrl()))
            && (this.getAdStatus() == null ? other.getAdStatus() == null : this.getAdStatus().equals(other.getAdStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAdId() == null) ? 0 : getAdId().hashCode());
        result = prime * result + ((getAdTitle() == null) ? 0 : getAdTitle().hashCode());
        result = prime * result + ((getAdMsg() == null) ? 0 : getAdMsg().hashCode());
        result = prime * result + ((getAdImg() == null) ? 0 : getAdImg().hashCode());
        result = prime * result + ((getAdUrl() == null) ? 0 : getAdUrl().hashCode());
        result = prime * result + ((getAdStatus() == null) ? 0 : getAdStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", adId=").append(adId);
        sb.append(", adTitle=").append(adTitle);
        sb.append(", adMsg=").append(adMsg);
        sb.append(", adImg=").append(adImg);
        sb.append(", adUrl=").append(adUrl);
        sb.append(", adStatus=").append(adStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}